<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>登录您的账号</title>
    <link rel="stylesheet" href="styles.css">
    <style>
        .container {
            padding: 20px;
        }
        
        .back-btn {
            color: white;
            font-size: 24px;
            margin-bottom: 30px;
        }
        
        .login-card {
            background: white;
            border-radius: 20px;
            padding: 30px 20px;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
        }
        
        .logo {
            text-align: center;
            margin-bottom: 30px;
        }
        
        .logo img {
            width: 80px;
            height: 80px;
            border-radius: 20px;
        }
        
        .welcome-text {
            text-align: center;
            margin-bottom: 30px;
        }
        
        .input-group {
            margin-bottom: 20px;
        }
        
        .input-field {
            width: 100%;
            padding: 12px 15px;
            border: 1px solid #ddd;
            border-radius: 10px;
            font-size: 14px;
        }
        
        .btn {
            width: 100%;
            padding: 12px;
            border: none;
            border-radius: 10px;
            font-size: 16px;
            font-weight: bold;
            background: #87CEFA;
            color: white;
        }
        
        .switch-form {
            text-align: center;
            margin-top: 15px;
            font-size: 14px;
        }
    </style>
</head>
<body>
    <div class="container">
        <a href="home.html" class="back-btn">
            <i class="fas fa-arrow-left"></i>
        </a>

        <div class="login-card">
            <div class="logo">
                <img src="image/28.jpg" alt="Logo">
            </div>

            <div class="welcome-text">
                <h1>欢迎回来</h1>
                <p>登录您的动漫世界账号</p>
            </div>

            <form id="loginForm">
                <div class="input-group">
                    <label>用户名</label>
                    <input type="text" id="loginUsername" class="input-field" placeholder="请输入用户名" required>
                </div>

                <div class="input-group">
                    <label>密码</label>
                    <input type="password" id="loginPassword" class="input-field" placeholder="请输入密码" required>
                </div>

                <button type="submit" class="btn">登录</button>
                <div class="switch-form">
                    没有账号？<a href="register.html">点击注册</a>
                </div>
            </form>
        </div>
    </div>
    <script>
        document.getElementById('loginForm').addEventListener('submit', function(event) {
            event.preventDefault();
            const username = document.getElementById('loginUsername').value;
            const password = document.getElementById('loginPassword').value;
            
            // 实际项目中这里会有后端验证
            localStorage.setItem('loggedInUser', username);
            alert('登录成功！');
            window.location.href = 'profile.html';
        });
    </script>
</body>
</html>